<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue</title>
</head>
<body>
<!--第一步，导入Vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
<div id="app">
    <h1 v-if="ok">YES</h1>
    <h1 v-else>No</h1>
</div>
<script>
    var vm = new Vue({
       el: "#app",
       data: {
           ok: true
       }
    });
</script>


</body>
</html>